package com.pwt.entity;

import com.pwt.annotation.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;

import lombok.EqualsAndHashCode;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;


/**
 * ManageFeature
 *
 * @author auto generated
 * @date 2021-08-31 12:03:28
 */
@EqualsAndHashCode
@Data
@Entity
@Table(name = "[manage_feature]")
@Schema(name = "ManageFeature")
@DynamicInsert
@DynamicUpdate
public class ManageFeature {
	@Id
	@GeneratedValue(generator="system_uuid")
	@GenericGenerator(name="system_uuid",strategy="uuid")
	@Column(name = "id")
	@Schema(description = "ID")
	@NotBlank(groups = Update.class,message = "修改时必传")
	protected String id;

	/**
	 * 产品id，关联product_manage.id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "productManageId",description = "产品id，关联product_manage.id")
	@Column(name = "product_manage_id", nullable = true, length = 32)
	private String productManageId;

	/**
	 * 检测特征id,关联product_feature.id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "productFeatureId",description = "检测特征id,关联product_feature.id")
	@Column(name = "product_feature_id", nullable = true, length = 32)
	private String productFeatureId;


	@Schema(hidden = true)
	@Transient
	private String name;

	@Schema(hidden = true)
	@Transient
	private String color;
}
